package com.atguigu.study.test;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @auther zzyy
 * @create 2025-02-14 13:56
 */
public class T2
{
    public static void main(String[] args)
    {
        Integer integer = Integer.valueOf(0);

        AtomicInteger atomicInteger = new AtomicInteger(5);

        //i++
        System.out.println(atomicInteger.getAndIncrement());
        //++i
        System.out.println(atomicInteger.incrementAndGet());

        //i--
        System.out.println(atomicInteger.getAndDecrement());

        System.out.println(atomicInteger.get());
    }
}
